home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 109 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.umbc.edu!not-for-mail
  2. From: schlein@umbc.edu (Jonas J. Schlein)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: What's so different about 2-D arrays???
  5. Date: 1 Jan 1996 17:55:10 -0500
  6. Organization: University of Maryland Baltimore County
  7. Message-ID: <4c9ooe$q6a@umbc9.umbc.edu>
  8. References: <4c799b$q9d@umbc9.umbc.edu> <4c8kdh$4qg@news1.usa.pipeline.com>
  9. NNTP-Posting-Host: f-umbc9.umbc.edu
  10. NNTP-Posting-User: schlein
  11.  
  12. Mark Winfield <mark@fredblog.demon.co.uk> wrote:
  13. > void main()
  14.  
  15. Jonas Schlein <schlein@gl.umbc.edu> wrote:
  16. > Please read the FAQ. This will show you why 'int main (void)' is the
  17. > correct declaration for your particular program. 
  18.  
  19. Pete <grantp@usa.pipeline.com> wrote:
  20. > As long as we're being so nit-picky, where in the FAQ does it say 
  21. > exactly that?  All I can find is "int main ()". 
  22.  
  23. Question 11.12 in the FAQ book states:
  24.  
  25. "Can I declare main as void to shut off these warnings about main not
  26.  returning a value?"
  27.  
  28. The excerpt of the answer I was referring to is:
  29.  
  30. "...In other words, there are just two valid declarations:
  31.  
  32.   int main (void)
  33.   int main (int argc, char **argv)
  34.  
  35. ..."
  36.  
  37. Since the original poster was not utilizing command line arguments
  38. of any kind the former of the 2 is correct for his program.
  39. -- 
  40. "If it wasn't for C, we would be using BASI, PASAL, and OBOL."
  41.  
  42. Jonas J. Schlein  (schlein@gl.umbc.edu)
  43.